import java.util.*;
public class Test {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        System.out.println(rearrangestring(str));
    }

    public static String rearrangestring (String str) {

        char[] arr = str.toCharArray();
        int len = arr.length;
        int[] hash = new int[26];
        char maxChar = '0';
        int countMax = 0;

        //找出字符串中出现次数最多的字符及出现的次数
        for (int i = 0; i < len; i++) {
            hash[arr[i] - 'a']++;
            if (hash[arr[i] - 'a'] > countMax) {
                maxChar = arr[i];
                countMax = hash[arr[i] - 'a'];
            }
        }

        //判断该字符串是否可以重排
        if (countMax > (len + 1) / 2) {
            return "";
        }

        //对出现次数最多的字符进行排序
        char[] ret = new char[len];
        int i = 0;
        while (countMax-- != 0) {
            ret[i] = maxChar;
            i += 2;
        }

        //对其他字符进行重排
        for (int j = 0; j < 26; j++) {
            if (hash[j] != 0 && (char)(j + 'a') != maxChar) {
                while (hash[j]-- != 0) {
                    if (i >= len) {
                        i = 1;
                    }
                    ret[i] = (char)(j + 'a');
                    i += 2;
                }

            }
        }
        return new String(ret);
    }
}
